package kr.hkit.powerjava.chapter06.assign_if;

public class Five {
	private int num1, num2, num3, min;

	
	public Five(int num1, int num2, int num3) {
		//super();
		this.num1 = num1;
		this.num2 = num2;
		this.num3 = num3;
	}

	int findMin() {
		if (num1 > num2) {
			if (num2 > num3) {
				// min:num3
				min = num3;
			} else {
				// min:num2
				min = num2;
			}
		}

		else {
			if (num1 > num3) {
				// min:num3
				min = num3;
			} else {
				// min:num1
				min = num1;
			}
		}
		return min;
	}


	@Override
	public String toString() {
		return "Five [가장 작은 값은 " + findMin() + "입니다.]";
	}
}
